package com.itheima.demo1hashset;

import java.util.HashSet;
import java.util.Set;

public class SetDemo2 {
    public static void main(String[] args) {
//        目标：掌握HashSet集合的去重操作
        Student s1 = new Student("小明", 23, "北京","123456");
        Student s2 = new Student("小明", 23, "北京","123456");
        Student s3 = new Student("李四", 12, "天津","13579");
        Student s4 = new Student("王五", 15, "河北","24680");
        Set<Student> set = new HashSet<>();
        set.add(s1);
        set.add(s2);
        set.add(s3);
        set.add(s4);
        System.out.println(set);
    }
}
